package serviceImpl;

import dao.InstructorMapper;
import entity.Instructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import service.InstructorService;

import java.util.List;

@Service
public class InstructorServiceImpl implements InstructorService {
    @Autowired
    private InstructorMapper instructorMapper;
    @Override
    public Instructor getInstructorByInstID(String instID) {
        return instructorMapper.getInstructorByInstID(instID);
    }

    @Override
    public Instructor getInstructorByInstIDAndPassword(String instID, String password) {
        return instructorMapper.getInstructorByInstIDAndPassword(instID,password);
    }

    @Override
    public List<Instructor> getAllInstructor() {
        return instructorMapper.getAllInstructor();
    }

    @Override
    public boolean updateInstructor(Instructor instructor) {
        return instructorMapper.updateInstructor(instructor);
    }

    @Override
    public boolean deleteInstructor(String instID) {
        return instructorMapper.deleteInstructor(instID);
    }

    @Override
    public boolean addInstructor(Instructor instructor) {
        return instructorMapper.addInstructor(instructor);
    }

    @Override
    public List<Instructor> getInstructorByInstIDORInstName(String instID, String instName) {
        return instructorMapper.getInstructorByInstIDORInstName(instID,instName);
    }


}
